#include <stdio.h>
#include <unistd.h>

int main()
{
    int val = 100;
    pid_t pid = fork();
    if(pid < 0)
    {
        perror("fork()");
    }
    else if(pid == 0)
    {
        printf("i am child,my value = %d,my address:%p\n",val,&val);
    }
    else 
    {
        printf("i am father,my value = %d,my address:%p\n",val,&val);
    }
    return 0;
}
